40823152cd2021

  • Home
    • Site Map
    • reveal
    • blog
  • about
  • W1-W4
    • W1
      • leo教學
      • 分組(2人專案)
    • W2
      • 轉軸問題
      • 擊球問題
      • coppeliaSim 比例問題
    • W3
      • 製作簡報
      • 小組網站(共同維護)
    • W4
      • 報告
      • cd2021_2a_age影片排序
      • Ant Renamer 操作說明
  • W5-w9
    • W5
      • stage2-ag12
      • 產品目標
      • 工作分配
    • W6
      • Lua control speed
    • W7
      • keyboard control
      • keyboard control for Four-bar linkage
    • W8
      • Inquire keyboard number
      • basketball Machine 2.4.3
  • stage1-product
    • 版本一
    • 版本二
    • 版本三
    • 版本四
    • pdf
  • Stage2-product
    • 2.1
    • 2.2
    • 2.3
    • 2.4
  • Stage3
    • W10
      • task1
      • task2
    • W11
      • task 1 教學
    • W12
      • stage2-ag12 python keyboard
    • W13
      • gitlab操作
      • xml
    • W14
      • fanuc_m710ic_50_pick_and_place
      • fanuc_m710ic_50_pick_and_place add suction ped
    • W15
      • MTB_robot_pick_and_place
      • MTB_robot_pick_and_place delete GUI
      • Movie subtite
    • W16
      • MTB_robot onshape
      • MTB_robot coppeliasim
      • MTB_robot add suction pad
      • MTB_robot add IK
      • MTB_robot python remote api
      • MTB_robo use require
    • W17
      • basketball machine add Mtb_robot
      • basketball machine final
    • W18
  • github flagged
  • Bug
    • Wsgi.py 打不開
MTB_robot onshape << Previous Next >> MTB_robot add suction pad

MTB_robot coppeliasim

W16_exam.7z

使用老師w15的鍵盤控制,使自己組裝完的MTB_robot可以鍵盤控制。

function sysCall_init()
    -- do some initialization here
     axis1=sim.getObjectHandle('MTB_axis1')
     axis1=sim.getObjectHandle('MTB_axis1')
     axis3=sim.getObjectHandle('MTB_axis3')
     axis4=sim.getObjectHandle('MTB_axis4')     
     rotation1 = 0
     distance3 = 0
     
     deg = math.pi/180
     --sim.sJointTargetVelocity(joint,5.5)
     
     
    
     

end

function sysCall_actuation()
 calibration = 0.0042
 message,auxiliaryData=sim.getSimulatorMessage()
 if (message==sim.message_keypress) then
      print(auxiliaryData[1])--key
      if (auxiliaryData[1]==string.byte(' ')) then
      end
      if (auxiliaryData[1]==97) then--a
      rotation1 = rotation1 + 5*deg
      sim.setJointPosition(axis1, rotation1)
      end
      if (auxiliaryData[1]==100) then --d
      rotation1 = rotation1 - 5*deg
      sim.setJointPosition(axis1, rotation1)
      end
      if (auxiliaryData[1]==119) then --s
      distance3 = distance3 + 0.01 + calibration
      sim.setJointPosition(axis3, distance3)
      end 
      if (auxiliaryData[1]==115) then --w
      distance3 = distance3 - 0.01 - calibration
      sim.setJointPosition(axis3, distance3)
      end
     
 end    


end
function sysCall_sensing()
    -- put your sensing code here
end

function sysCall_cleanup()
    -- do some clean-up here
end

-- See the user manual or the available code snippets for additional callback functions and details


MTB_robot組裝教學:

w16_t.7zip

參考影片:


MTB_robot onshape << Previous Next >> MTB_robot add suction pad

Copyright © All rights reserved | This template is made with by Colorlib